package fjut.acm.coding.mapper;

import fjut.acm.coding.entity.ChallengeUserOpenBlockPO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ChallengeUserOpenBlockMapper extends Mapper<ChallengeUserOpenBlockPO> {
    /**
     * 插入一个解锁记录
     *
     * @param challengeUserOpenBlockPO
     * @return
     */
    int insert(@Param("challengeUserOpenBlockPO") ChallengeUserOpenBlockPO challengeUserOpenBlockPO);

    /**
     * 获取用户已开放的挑战模块ID
     *
     * @param username
     * @return
     */
    List<Integer> selectByUsername(@Param("username") String username);
}
